//
//  AppManager.h
//  HiZhua
//
//  Created by Jpwang on 2017/8/7.
//  Copyright © 2017年 Jpwang. All rights reserved.
//

#import <Foundation/Foundation.h>


#define APPID @"1343067734"

#define public_key @"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCGF97ROGoehllVZ6drmBp4wyJAfqYP050mnEqD3vrAGUh8lTiAz5+lhfAwXNube8O7Xj/byoRaIUYm8/iCr7py3ykX2ahhYU2A2XaOFTsB2dl/7iD8Av8OjKr8Y2y1ZF/Rd6XeR22cUiv7n25UFpzj3ktakFG1MYeNq7w+94aR0wIDAQAB"


#define wx_app_id @"wxffd93082219e9da5"
#define wx_app_secret @"4f0f17998149104cc8cbf637a2a8243f"
#define wx_app_mch_id @""

#define alipay_app_id @""
#define alipay_app_secret @""
#define alipay_app_mch_id @""

#define Sina_App_Key      @"829108380"
#define Sina_Redirect_Url @"https://api.weibo.com/oauth2/default.html"
#define String Sina_Scope @"email,direct_messages_read,direct_messages_write, friendships_groups_read,friendships_groups_write,statuses_to_me_read,follow_app_official_microblog, invitation_write"


#define globalRadius 6
#define mLength  50

#define umeng_app_id @"5a5c595d8f4a9d4cd300006e"
#pragma mark 友盟自定义事件
static  NSString * on_click_prize_detail = @"on_click_prize_detail";
static  NSString * danmu_off = @"danmu_off";
static  NSString * danmu_on = @"danmu_on";
static  NSString * on_music_off = @"on_music_off";
static  NSString * on_music_on = @"on_music_on";
static  NSString * on_click_camera = @"on_click_camera";
static  NSString * on_click_wx_login = @"on_click_wx_login";
static  NSString * menu_index = @"on_click_menu_index";
static  NSString * menu_game_list = @"on_click_menu_game_list";
static  NSString * menu_find = @"on_click_menu_find";
static  NSString * menu_user = @"on_click_menu_user";
static  NSString * user_set = @"on_click_user_set";
static  NSString * recharge_index = @"on_click_recharge_index";
static  NSString * recharge_user = @"on_click_recharge_user";
static  NSString * recharge_machine = @"on_click_recharge_machine";
static  NSString * user_recharge_list = @"on_click_user_recharge_list";
static  NSString * user_prize_list = @"on_click_user_prize_list";
static  NSString * user_mailing_list = @"on_click_user_mailing_list";
static  NSString * user_coupon_code = @"on_click_user_coupon_code";
static  NSString * user_share = @"on_click_user_share";
static  NSString * user_cp = @"on_click_user_cp";
static  NSString * set_modify = @"on_click_set_modify";
static  NSString * set_reset = @"on_click_set_reset";
static  NSString * set_about = @"on_click_set_about";
static  NSString * set_update = @"on_click_set_update";
static  NSString * set_logout = @"on_click_set_logout";
static  NSString * find_video_play = @"play_video_in_find";
static  NSString * find_more_hot = @"on_click_find_more_hot";
static  NSString * find_more_my = @"on_click_find_more_my";
static  NSString * find_ranking_list = @"on_click_find_ranking_list";
static  NSString * find_video_list = @"on_click_find_video_list";
static  NSString * machine_watch = @"machine_watch_number";
static  NSString * modify_head_portrait = @"on_click_modify_head_portrait";
static  NSString * modify_nick = @"on_click_modify_nick";
static  NSString * modify_sex = @"on_click_modify_sex";
static  NSString * modify_phone = @"on_click_modify_phone";
static  NSString * modify_e_mail = @"on_click_modify_e_mail";
static  NSString * modify_address = @"on_click_modify_address";
static  NSString * share_to_wx_friend = @"share_to_wx_friend";
static  NSString * share_to_wx_time_line = @"share_to_wx_time_line";
static  NSString * share_from_coupon = @"share_from_coupon";
static  NSString * share_from_video = @"share_from_video";
static  NSString * share_from_grab = @"share_from_grab";
static  NSString * share_to_wx_success = @"share_to_wx_success";
static  NSString * user_operate_with_wifi = @"user_operate_with_wifi";
static  NSString * user_operate_with_flow = @"user_operate_with_flow";


#pragma mark ************************************************************************************************************
#pragma mark 服务端配置的错误码
#pragma mark ************************************************************************************************************
@interface ErrorCode : MTLModel <MTLJSONSerializing>

@property(strong, nonatomic) NSString *code;
@property(strong, nonatomic) NSString *desc;

@end

#pragma mark ************************************************************************************************************
#pragma mark 服务端配置的错误码处理工具
#pragma mark ************************************************************************************************************
@interface ErrorCodeUtil : NSObject

+ (ErrorCodeUtil *)shareInstance;

- (void)setData:(NSDictionary *)data;

- (NSString *)version;

- (NSString *)descByCode:(NSString *)code;

@end



#pragma mark ************************************************************************************************************
#pragma mark 设备信息
#pragma mark ************************************************************************************************************
@interface DeviceInfo : NSObject

- (NSString *)carrierName;

- (NSString *)osBuildTime;

- (NSString *)osName;

- (NSString *)osVersion;

- (NSString *)appName;

- (NSString *)appVersion;

- (NSString *)appBuild;

- (NSString *)model;

- (double)freeMemory;

- (double)totalMemory;

- (double)usedMemory;

- (double)freeDiskSpace;

- (double)totalDiskSpace;

-(uint64_t)getFreeDiskspace;

- (void)getDivceSize;

@end

#pragma mark ************************************************************************************************************
#pragma mark AppManager
#pragma mark ************************************************************************************************************
@interface AppManager : NSObject

+ (AppManager *)shareInstance;

- (BOOL)isReview;

- (void)setIsReview:(BOOL) isReview;

- (NSString *)deviceID;

- (NSString *)installID;

@end
